CREATE TABLE [dbo].[tb_LicenciasHistoricasAudit]
(
[idLicenciaHistoricaAudit] [int] NOT NULL IDENTITY(1, 1),
[idLicenciaHistorica] [int] NOT NULL,
[Agente] [int] NULL,
[Licencia] [int] NOT NULL,
[ConOSinGoce] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FechaAlta] [datetime] NOT NULL,
[Baja] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[FechaBaja] [datetime] NOT NULL,
[Dias] [int] NOT NULL,
[Funcion] [int] NULL,
[FechaRegistro] [datetime] NULL CONSTRAINT [DF_tb_LicenciasHistoricasAudit_FechaRegistro] DEFAULT (getdate()),
[CargadaPor] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF_tb_LicenciasHistoricasAudit_CargadaPor] DEFAULT (suser_sname()),
[Operacion] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[FechaOperacion] [datetime] NOT NULL,
[UsuarioNT] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF__tb_LicenciasHistoricasAudit__Usuar__7751F054] DEFAULT (suser_sname())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_LicenciasHistoricasAudit] ADD CONSTRAINT [PK_tb_LicenciasHistoricasAudit] PRIMARY KEY CLUSTERED  ([idLicenciaHistoricaAudit]) ON [PRIMARY]
GO
